Skip to content

Remove Debug bound from various traits#860

Closed
philipc wants to merge 1 commit intogimli-rs:masterfrom
philipc:debug
Closed

Remove Debug bound from various traits#860
philipc wants to merge 1 commit intogimli-rs:masterfrom
philipc:debug

Conversation

@philipc
Copy link
Collaborator

@philipc philipc commented Jan 13, 2026

Remove Debug bound from Reader, ReaderOffset, UnwindSection and UnwindOffset. This isn't necessary for their operation, and users can define their own trait if they require it.

There's a bit of complexity to get the derived Debug implementations to work correctly with associated types. We already had this sort of thing in a lot of places because it helps with lifetime variance too.

Also reduce the places where the dwarfdump example uses Debug to print.

Remove `Debug` bound from `Reader`, `ReaderOffset`, `UnwindSection` and
`UnwindOffset`. This isn't necessary for their operation, and users can
define their own trait if they require it.

There's a bit of complexity to get the derived Debug implementations
to work correctly with associated types. We already had this sort of
thing in a lot of places because it helps with lifetime variance too.

Also reduce the places where the dwarfdump example uses Debug to print.
@philipc
Copy link
Collaborator Author

philipc commented Jan 13, 2026

In addition to the complexity, this change means we can no longer use things like dbg! in many places inside gimli. I'm not sure this change is worth it.

@philipc philipc closed this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant